package com.tang.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tang.crm.dto.RoleDto;
import com.tang.crm.entity.Role;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    @MapKey("id")
    List<Map<String, Object>> selectRoleList(@Param("userId") Integer userId);

    IPage<Map<String, Object>> selectByParams(IPage<Role> page, @Param("params") RoleDto roleDto);
}
